package com.redoor.app.stake.basicdata.model;

/**
 * Created by wangjunlei on 2018/2/28.
 */
public enum RegistrationForRedisEnum {
    REGISTRATION_FOR_REDIS("REGISTRATION_FOR_REDIS",1);
    // 注册码申请信息枚举名称，作为REDIS缓存前缀
    private String name;
    private int type;
    // 构造方法
    private RegistrationForRedisEnum(String name, int type) {
        this.name = name;
        this.type = type;
    }
    // 普通方法
    public static String getName(int type) {
        for (RegistrationForRedisEnum c : RegistrationForRedisEnum.values()) {
            if (c.getType() == type) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
